/********************************* Map() ********************************** */
function myFunction() {
    var numbers = [4, 9, 16, 25];
    const myMap = new Map(numbers.map(b => [b, b * b]));
    console.log({ myMap });
    console.log('map(1)', myMap.get(9));

    demo(numbers);
}

function demo(numbers) {
    console.log(' ********************** demo ********************** ');
    console.log(numbers.map(b => [b, b * b]));
    console.log(numbers.map(function (item) { return [item, item * item]; }));

    const myMap2 = new Map([[1, 'one'], [2, 'two'], [3, 'three'],]);
    console.log({ myMap2 });
}
myFunction();
/************************************************************************* */